package com.tuyrt.hi.ui.app

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.TextView
import com.tuyrt.hi.ui.app.demo.banner.HiBannerDemoActivity
import com.tuyrt.hi.ui.app.demo.refresh.HiRefreshDemoActivity
import com.tuyrt.hi.ui.app.demo.tab.HiTabBottomDemoActivity
import com.tuyrt.hi.ui.app.demo.tab.HiTabTopDemoActivity
import com.tuyrt.hi.ui.tab.bottom.HiTabBottom
import com.tuyrt.hi.ui.tab.bottom.HiTabBottomInfo

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val hiHome = findViewById<HiTabBottom>(R.id.hi_home)
        val hiTabInfo = HiTabBottomInfo(
            "首页",
            "fonts/iconfont.ttf",
            getString(R.string.if_home),
            null,
            "#ff656565",
            "#ffd44949"
        )
        hiHome.setHiTabInfo(hiTabInfo)

        findViewById<TextView>(R.id.hiRefresh).setOnClickListener {
            startActivity(Intent(this, HiRefreshDemoActivity::class.java))
        }
        findViewById<TextView>(R.id.hiTabBottom).setOnClickListener {
            startActivity(Intent(this, HiTabBottomDemoActivity::class.java))
        }
        findViewById<TextView>(R.id.hiTabTop).setOnClickListener {
            startActivity(Intent(this, HiTabTopDemoActivity::class.java))
        }
        findViewById<TextView>(R.id.hiBanner).setOnClickListener {
            startActivity(Intent(this, HiBannerDemoActivity::class.java))
        }
    }
}